import request from '../request'

export const getTypeList = (params) =>
  request({ url: '/task/type/list', params })

export const deleteType = (params) =>
  request({ url: `/task/type/delete/${params.id}` })

export const addType = (params) =>
  request({ method: 'post', url: '/task/type/add', data: params })

export const editType = (params) =>
  request({ method: 'post', url: '/task/type/edit', data: params })

export const getTaskCountList = (params) =>
  request({ url: '/task/info/count/list', params })

export const getTaskInfoPage = (params) =>
  request({ url: '/task/info/page', params })

export const taskInfoDetail = (params) =>
  request({ url: `/task/info/get/${params.id}` })

export const deleteTaskInfo = (id) =>
  request({ url: `/task/info/delete/${id}` })

export const addTaskInfo = (params) =>
  request({ method: 'post', url: '/task/info/add', data: params })

export const editTaskInfo = (params) =>
  request({ method: 'post', url: '/task/info/edit', data: params })

export const TaskInfoComplete = (params) =>
  request({ method: 'post', url: '/task/info/complete', data: params })

export const exportTaskInfoPage = (params) =>
  request({ url: '/task/info/export', params })

export const addTaskConfig = (params) =>
  request({ method: 'post', url: '/task/config/add', data: params })

export const getTaskConfigList = (params) =>
  request({ url: '/task/config/list', params })
